package com.example.spark.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.spark.entity.Direction;
import com.example.spark.entity.result.CommonResult;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

public interface DirectionService extends IService<Direction> {

    //查询单个学习方向
    CommonResult selectById(Long id);

    //新增学习方向
    CommonResult addDirection(Direction direction);

    //修改学习方向
    CommonResult updateDirection(Direction direction);

    //删除学习方法
    CommonResult deleteDirection(Long id);

    //分页列表
    IPage<Direction> getPage(int pageSize, int currentPage);
    //图片上传
    CommonResult addPhoto(MultipartFile photoFile, Long id) throws IOException;

    //获取id和名称
    CommonResult getIdAndName();
}
